package com.ruoyi.biz.rest.organization;

import com.alibaba.fastjson2.JSONObject;
import com.ruoyi.biz.organization.service.IBizCompanyService;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 企业信息Controller
 *
 * @author Fei.Cong
 * @date 2023-04-21
 */
@RestController
@RequestMapping("/api/v1/organization/company")
public class RestCompanyController extends BaseController {

    @Autowired
    private IBizCompanyService bizCompanyService;

    /**
     * 新增企业信息
     */
    @Log(title = "企业信息", businessType = BusinessType.REST)
    @PostMapping(value = "/add")
    public AjaxResult remoteAdd(@RequestBody JSONObject jsonObject) {
        bizCompanyService.remoteAdd(jsonObject);
        return success();
    }
}
